package com.hjx.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.sql.DataSource;

/**
 * <p>Title:</p>
 * <p>Description:</p>
 *
 * @author hjx
 * @date 2020/6/10 - 8:51
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
    @Bean
    @ConfigurationProperties("spring.datasource.druid")
    public DataSource druid(){
        return new DruidDataSource();
    }

}
